"use client"
import { useContext, useEffect, useRef, useState } from "react";
import { useNodeMap } from "@/store/client/modules/reactdndStore/useNode";
import { Col } from "antd";
import SubassemblyView from "../../..";
const DraggableColView: React.FC<reactDndProps> = ({ data }) => {
    const { boxIndex } = useNodeMap()

    // 合并 drag 和 drop 到同一个节点上
    useEffect(() => {

    })
    return <Col span={data.span} offset={data.offset} push={data.push} className=" bg-amber-200" >
        {boxIndex[data.id]?.length !== 0 && boxIndex[data.id]?.map((node: any, index: any) => {
            return <SubassemblyView key={node} id={node} />
        })}
    </Col>


}
export default DraggableColView;